<?php

class PressPaperColority extends PressDirModel
{
	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'ut_press_paper_colority';
	}
	
	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('ut_press_id, ut_paper_id, ut_colority_id', 'required'),
			array('ut_press_id, ut_paper_id, ut_colority_id', 'type', 'type'=>'integer'),
		);
	}

	public function defaultScope()
	{
		return array('with'=>'colority');
	}	
	
	
	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
			'press_paper'=>array(self::BELONGS_TO,'PressPaper','ut_press_id,ut_paper_id'),
			'colority'=>array(self::BELONGS_TO,'Colority','ut_colority_id'),
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(	);
	}


	
}